package cn.com.connext.scrm.domain.master;

import com.connext.common.domain.UUIDDomain;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.time.ZonedDateTime;
import java.util.Date;
import java.util.Objects;

/**
 * Created by YANG205 on 2018/6/27.
 */
@Entity
@DynamicUpdate
@Table(name = "znhj_entity_temp")   // 定义数据库表名
public class ZnhjEntityTemp implements UUIDDomain, Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    private String id;
    //skuId
    @Column(name = "sku_id", nullable = false)
    private String skuId;

    //uniqueCode品码
    @Column(name = "bottle_code", nullable = false)
    private String bottleCode;

    //uniqueCode唯一码
    @Column(name = "unique_code", nullable = false)
    private String uniqueCode;


    @Column(name = "create_time", nullable = false)
    private ZonedDateTime createTime;

    @Column(name = "bottle_unique", nullable = false)
    private String bottleUnique;

    @Column(name = "status", nullable = false)
    private String status;
    @Column(name = "reel_code", nullable = false)
    private String reelCode;
    @Column(name = "batch_no", nullable = false)
    private String batchNo;
    @Column(name = "void_time", nullable = false)
    private Date voidTime;
    @Column(name = "active_time", nullable = false)
    private Date activeTime;
    @Column(name = "operation", nullable = false)
    private Integer operation;


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ZnhjEntityTemp entity = (ZnhjEntityTemp) o;
        return
            Objects.equals(bottleCode, entity.bottleCode) &&
                Objects.equals(uniqueCode, entity.uniqueCode);
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    public String getSkuId() {
        return skuId;
    }

    public void setSkuId(String skuId) {
        this.skuId = skuId;
    }

    public String getBottleCode() {
        return bottleCode;
    }

    public void setBottleCode(String bottleCode) {
        this.bottleCode = bottleCode;
    }

    public String getUniqueCode() {
        return uniqueCode;
    }

    public void setUniqueCode(String uniqueCode) {
        this.uniqueCode = uniqueCode;
    }

    public ZonedDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(ZonedDateTime createTime) {
        this.createTime = createTime;
    }

    public String getBottleUnique() {
        return bottleUnique;
    }

    public void setBottleUnique(String bottleUnique) {
        this.bottleUnique = bottleUnique;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getReelCode() {
        return reelCode;
    }

    public void setReelCode(String reelCode) {
        this.reelCode = reelCode;
    }

    public String getBatchNo() {
        return batchNo;
    }

    public void setBatchNo(String batchNo) {
        this.batchNo = batchNo;
    }

    public Date getVoidTime() {
        return voidTime;
    }

    public void setVoidTime(Date voidTime) {
        this.voidTime = voidTime;
    }

    public Date getActiveTime() {
        return activeTime;
    }

    public void setActiveTime(Date activeTime) {
        this.activeTime = activeTime;
    }

    public Integer getOperation() {
        return operation;
    }

    public void setOperation(Integer operation) {
        this.operation = operation;
    }


}
